package com.ag.bean;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * TbAidgoogs entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "TB_AIDGOOGS", schema = "dbo", catalog = "AGDB")
public class TbAidgoogs implements java.io.Serializable {

	// Fields

	private TbAidgoogsId id;
	private TbGoods tbGoods;
	private TbAidgoodsku tbAidgoodsku;
	private TbGoodsstatus tbGoodsstatus;
	private Integer agNumber;
	private String a;
	private String b;
	private String c;

	// Constructors

	/** default constructor */
	public TbAidgoogs() {
	}

	/** minimal constructor */
	public TbAidgoogs(TbAidgoogsId id, TbGoods tbGoods,
			TbAidgoodsku tbAidgoodsku, TbGoodsstatus tbGoodsstatus,
			Integer agNumber) {
		this.id = id;
		this.tbGoods = tbGoods;
		this.tbAidgoodsku = tbAidgoodsku;
		this.tbGoodsstatus = tbGoodsstatus;
		this.agNumber = agNumber;
	}

	/** full constructor */
	public TbAidgoogs(TbAidgoogsId id, TbGoods tbGoods,
			TbAidgoodsku tbAidgoodsku, TbGoodsstatus tbGoodsstatus,
			Integer agNumber, String a, String b, String c) {
		this.id = id;
		this.tbGoods = tbGoods;
		this.tbAidgoodsku = tbAidgoodsku;
		this.tbGoodsstatus = tbGoodsstatus;
		this.agNumber = agNumber;
		this.a = a;
		this.b = b;
		this.c = c;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "aidId", column = @Column(name = "AID_ID", nullable = false, length = 10)),
			@AttributeOverride(name = "goodsId", column = @Column(name = "GOODS_ID", nullable = false, length = 14)) })
	public TbAidgoogsId getId() {
		return this.id;
	}

	public void setId(TbAidgoogsId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GOODS_ID", nullable = false, insertable = false, updatable = false)
	public TbGoods getTbGoods() {
		return this.tbGoods;
	}

	public void setTbGoods(TbGoods tbGoods) {
		this.tbGoods = tbGoods;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "AID_ID", nullable = false, insertable = false, updatable = false)
	public TbAidgoodsku getTbAidgoodsku() {
		return this.tbAidgoodsku;
	}

	public void setTbAidgoodsku(TbAidgoodsku tbAidgoodsku) {
		this.tbAidgoodsku = tbAidgoodsku;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "GSTATUS_ID", nullable = false)
	public TbGoodsstatus getTbGoodsstatus() {
		return this.tbGoodsstatus;
	}

	public void setTbGoodsstatus(TbGoodsstatus tbGoodsstatus) {
		this.tbGoodsstatus = tbGoodsstatus;
	}

	@Column(name = "AG_NUMBER", nullable = false)
	public Integer getAgNumber() {
		return this.agNumber;
	}

	public void setAgNumber(Integer agNumber) {
		this.agNumber = agNumber;
	}

	@Column(name = "A", length = 50)
	public String getA() {
		return this.a;
	}

	public void setA(String a) {
		this.a = a;
	}

	@Column(name = "B", length = 50)
	public String getB() {
		return this.b;
	}

	public void setB(String b) {
		this.b = b;
	}

	@Column(name = "C", length = 50)
	public String getC() {
		return this.c;
	}

	public void setC(String c) {
		this.c = c;
	}

}